﻿function GetUserInfo(url) {
    $.ajax({
        type: "GET",
        dataType: "json",
        cache: false,
        url: url,
        success: function (response) {
            var site = response.Site;
            var dir = response.Direction;
            var dept = response.Departement;
            var codeSrv = response.CodeService;
            $('.myvplink-title').append('<span>, ' + dept + '</span>');
            $('.myvplink-title').append('<span>, ' + dir + '</span>');
            $('.myvplink-site').append('<span>' + site + '</span>');
        },
        error: function (errorData) {
        }
    });
}
$(document).ready(function () {
    var url = "/_layouts/15/vplink2014/MyVPLink/ApplicationPages/UserInfo.aspx";
    GetUserInfo(url);
});